let init=''
function loginReducer(preVal=init,action) {
    let {type,data}=action
    switch (type) {
        case 'login':
            return preVal=data    
        default:
            return preVal
    }
}
export default loginReducer